<?php
function connect($sql)
{
    $conn= mysql_connect('localhost', 'root','vertrigo');
    mysql_select_db("tdc",$conn);
 
    $dulieu = mysql_query($sql);
    $data = array();
    while($row = mysql_fetch_array($dulieu))
    {
        $data[]=$row;
    }
    return $data;

}
?>
<?php
function connect1($sql1)
{
    $conn1= mysql_connect('localhost', 'root','vertrigo');
    mysql_select_db("tdc",$conn1);
    
    $dulieu = mysql_query($sql1);
    $data = array();
    while($row = mysql_fetch_array($dulieu))
    {
        $data[]=$row;
    }
    return $data;

}

?>
